package com.demo.common.feign;

import com.demo.common.entity.User;
import com.demo.common.config.DemoFeignConfiguration;
import com.demo.common.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "user-service", configuration = DemoFeignConfiguration.class, /*fallback = UserFeignFallBack.class,*/fallbackFactory = UserFeignFallBackFactory.class)
public interface UserFeign {

    @PostMapping("/user/getuser")
    R getUser(@RequestBody User user);

    @PostMapping("/user/saveUser")
    R saveUser();
}
